<!DOCTYPE html>
<html>
  <head>
    <meta name="creator" content="mantohtml v2.0.2">
    <title>cupsd-logs(5)</title>
  </head>
  <body>
    <h1 id="cupsd-logs-5">cupsd-logs(5)</h1>
    <h2 id="cupsd-logs-5.name">Name</h2>
<p>cupsd-logs - cupsd log files (access_log, error_log, and page_log)
</p>
    <h2 id="cupsd-logs-5.description">Description</h2>
<a href="cupsd.html"><p><strong>cupsd</strong>(8)</a>

normally maintains three log files: <em>access_log</em> to track requests that are submitted to the scheduler, <em>error_log</em> to track progress and errors, and <em>page_log</em> to track pages that are printed.
Configuration directives in
<a href="cupsd.conf.html"><strong>cupsd.conf</strong>(5)</a>

and
<a href="cups-files.conf.html"><strong>cups-files.conf</strong>(5)</a>

control what information is logged and where it is stored.
</p>
    <h3 id="cupsd-logs-5.description.access-log-file-format">Access Log File Format</h3>
<p>The <em>access_log</em> file lists each HTTP resource that is accessed by a web browser or client.
Each line is in an extended version of the so-called &quot;Common Log Format&quot; used by many web servers and web reporting tools:
</p>
    <pre>
    <em>host group user date-time </em>&quot;<em>method resource version</em>&quot; <em>status bytes
      ipp-operation ipp-status</em>

</pre>
<p>For example:
</p>
    <pre>
    10.0.1.2 - - [01/Dec/2005:21:50:28 +0000] &quot;POST / HTTP/1.1&quot; 200 317
      CUPS-Get-Printers successful-ok-ignored-or-substituted-attributes
    localhost - - [01/Dec/2005:21:50:32 +0000] &quot;GET /admin HTTP/1.1&quot;
      200 0 - -
    localhost - - [01/Dec/2005:21:50:32 +0000] &quot;POST / HTTP/1.1&quot;
      200 157 CUPS-Get-Printers
      successful-ok-ignored-or-substituted-attributes
    localhost - - [01/Dec/2005:21:50:32 +0000] &quot;POST / HTTP/1.1&quot;
      200 1411 CUPS-Get-Devices -
    localhost - - [01/Dec/2005:21:50:32 +0000] &quot;GET /admin HTTP/1.1&quot;
      200 6667 - -

</pre>
<p>The <em>host</em> field will normally only be an IP address unless you have enabled the HostNameLookups directive in the <em>cupsd.conf</em> file or if the IP address corresponds to your local machine.
</p>
    <p>The <em>group</em> field always contains &quot;-&quot;.
</p>
    <p>The <em>user</em> field is the authenticated username of the requesting user.
If no username and password is supplied for the request then this field contains &quot;-&quot;.
</p>
    <p>The <em>date-time</em> field is the date and time of the request in local time and is in the format &quot;[DD/MON/YYYY:HH:MM:SS +ZZZZ]&quot;.
</p>
    <p>The <em>method</em> field is the HTTP method used: &quot;GET&quot;, &quot;HEAD&quot;, &quot;OPTIONS&quot;, &quot;POST&quot;, or &quot;PUT&quot;.
&quot;GET&quot; requests are used to get files from the server, both for the web interface and to get configuration and log files.
&quot;HEAD&quot; requests are used to get information about a resource prior to a &quot;GET&quot;.
&quot;OPTIONS&quot; requests are used to upgrade connections to TLS encryption.
&quot;POST&quot; requests are used for web interface forms and IPP requests.
&quot;PUT&quot; requests are used to upload configuration files.
</p>
    <p>The <em>resource</em> field is the filename of the requested resource.
</p>
    <p>The <em>version</em> field is the HTTP specification version used by the client.
For CUPS clients this will always be &quot;HTTP/1.1&quot;.
</p>
    <p>The <em>status</em> field contains the HTTP result status of the request, as follows:
    <div style="margin-left: 2.5em;">
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;">200<br>
Successful operation.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;">201<br>
File created/modified successfully.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;">304<br>
The requested file has not changed.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;">400<br>
Bad HTTP request; typically this means that you have a malicious program trying to access your server.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;">401<br>
Unauthorized, authentication (username + password) is required.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;">403<br>
Access is forbidden; typically this means that a client tried to access a file or resource they do not have permission to access.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;">404<br>
The file or resource does not exist.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;">405<br>
URL access method is not allowed; typically this means you have a web browser using your server as a proxy.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;">413<br>
Request too large; typically this means that a client tried to print a file larger than the MaxRequestSize allows.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;">426<br>
Upgrading to TLS-encrypted connection.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;">500<br>
Server error; typically this happens when the server is unable to open/create a file - consult the error_log file for details.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;">501<br>
The client requested encryption but encryption support is not enabled/compiled in.
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;">505<br>
HTTP version number not supported; typically this means that you have a malicious program trying to access your server.
    </div>
</p>
    <p>The <em>bytes</em> field contains the number of bytes in the request.
For POST requests the bytes field contains the number of bytes of non-IPP data that is received from the client.
</p>
    <p>The <em>ipp-operation</em> field contains either &quot;-&quot; for non-IPP requests or the IPP operation name for POST requests containing an IPP request.
</p>
    <p>The <em>ipp-status</em> field contains either &quot;-&quot; for non-IPP requests or the IPP status code name for POST requests containing an IPP response.
</p>
    <h3 id="cupsd-logs-5.description.error-log-file-format">Error Log File Format</h3>
<p>The <em>error_log</em> file lists messages from the scheduler - errors, warnings, etc. The LogLevel directive in the
<a href="cupsd.conf.html"><strong>cupsd.conf</strong>(5)</a>

file controls which messages are logged:
</p>
    <pre>
    level date-time message

</pre>
<p>For example:
</p>
    <pre>
    I [20/May/1999:19:18:28 +0000] [Job 1] Queued on 'DeskJet' by 'mike'.
    D [20/May/1999:19:18:28 +0000] [Job 1] argv[0]=&quot;DeskJet&quot;
    D [20/May/1999:19:18:28 +0000] [Job 1] argv[1]=&quot;1&quot;
    D [20/May/1999:19:18:28 +0000] [Job 1] argv[2]=&quot;mike&quot;
    D [20/May/1999:19:18:28 +0000] [Job 1] argv[3]=&quot;myjob&quot;
    D [20/May/1999:19:18:28 +0000] [Job 1] argv[4]=&quot;1&quot;
    D [20/May/1999:19:18:28 +0000] [Job 1] argv[5]=&quot;media=
      na_letter_8.5x11in sides=one-sided&quot;
    D [20/May/1999:19:18:28 +0000] [Job 1] argv[6]=&quot;/var/spool/cups/
      d000001-001&quot;
    I [20/May/1999:19:21:02 +0000] [Job 2] Queued on 'DeskJet' by 'mike'.
    I [20/May/1999:19:22:24 +0000] [Job 2] Canceled by 'mike'.

</pre>
<p>The <em>level</em> field contains the type of message:
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;">A<br>
Alert message (LogLevel alert)
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;">C<br>
Critical error message (LogLevel crit)
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;">D<br>
Debugging message (LogLevel debug)
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;">d<br>
Detailed debugging message (LogLevel debug2)
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;">E<br>
Normal error message (LogLevel error)
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;">I<br>
Informational message (LogLevel info)
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;">N<br>
Notice message (LogLevel notice)
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;">W<br>
Warning message (LogLevel warn)
</p>
    <p style="margin-left: 2.5em; text-indent: -2.5em;">X<br>
Emergency error message (LogLevel emerg)
</p>
    <p>The <em>date-time</em> field contains the date and time of when the page started printing. The format of this field is identical to the data-time field in the <em>access_log</em> file.
</p>
    <p>The <em>message</em> field contains a free-form textual message.
Messages from job filters are prefixed with &quot;[Job NNN]&quot; where &quot;NNN&quot; is the job ID.
</p>
    <h3 id="cupsd-logs-5.description.page-log-file-format">Page Log File Format</h3>
<p>The <em>page_log</em> file lists the total number of pages (sheets) that are printed.
By default, each line contains the following information:
</p>
    <pre>
    <em>printer user job-id date-time </em><strong>total </strong><em>num-sheets job-billing
      job-originating-host-name job-name media sides</em>

</pre>
<p>For example the entry for a two page job called &quot;myjob&quot; might look like:
</p>
    <pre>
    DeskJet root 1 [20/May/1999:19:21:06 +0000] total 2 acme-123
      localhost myjob na_letter_8.5x11in one-sided

</pre>
<p>The PageLogFormat directive in the
<a href="cupsd.conf.html"><strong>cupsd.conf</strong>(5)</a>

file can be used to change this information.
</p>
    <p>The <em>printer</em> field contains the name of the printer that printed the page.
If you send a job to a printer class, this field will contain the name of the printer that was assigned the job.
</p>
    <p>The <em>user</em> field contains the name of the user (the IPP requesting-user-name attribute) that submitted this file for printing.
</p>
    <p>The <em>job-id</em> field contains the job number of the page being printed.
</p>
    <p>The <em>date-time</em> field contains the date and time of when the page started printing.
The format of this field is identical to the data-time field in the <em>access_log</em> file.
</p>
    <p>The <em>num-sheets</em> field provides the total number of pages (sheets) that have been printed on for the job.
</p>
    <p>The <em>job-billing</em> field contains a copy of the job-billing or job-account-id attributes provided with the IPP Create-Job or Print-Job requests or &quot;-&quot; if neither was provided.
</p>
    <p>The <em>job-originating-host-name</em> field contains the hostname or IP address of the client that printed the job.
</p>
    <p>The <em>job-name</em> field contains a copy of the job-name attribute provided with the IPP Create-Job or Print-Job requests or &quot;-&quot; if none was provided.
</p>
    <p>The <em>media</em> field contains a copy of the media or media-col/media-size attribute provided with the IPP Create-Job or Print-Job requests or &quot;-&quot; if none was provided.
</p>
    <p>The <em>sides</em> field contains a copy of the sides attribute provided with the IPP Create-Job or Print-Job requests or &quot;-&quot; if none was provided.
</p>
    <h2 id="cupsd-logs-5.see-also">See Also</h2>
<a href="cupsd.html"><p><strong>cupsd</strong>(8),</a>

<a href="cupsd.conf.html"><strong>cupsd.conf</strong>(5),</a>

<a href="cups-files.conf.html"><strong>cups-files.conf</strong>(5),</a>

CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
</p>
    <h2 id="cupsd-logs-5.copyright">Copyright</h2>
<p>Copyright &copy; 2020-2024 by OpenPrinting.
  </body>
</html>
